package main

import (
	"github.com/axgle/mahonia"
	"golang.org/x/text/encoding/simplifiedchinese"
)

func Str2GBK(str string) string {
	gbk, _ := simplifiedchinese.GBK.NewEncoder().String(str)
	return gbk
}

func Str2UTF8(str string) string {
	e := mahonia.NewEncoder("utf-8")
	return e.ConvertString(str)
}
